package com.github.lybgeek.mock.controller;


import com.github.lybgeek.hello.service.HelloService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import jakarta.annotation.Resource;
import jakarta.servlet.http.HttpServletRequest;


@RestController
@RequestMapping("/")
public class HelloController {


    @Resource
    private HelloService helloService;



    @GetMapping("hello")
    public String hello(String name, HttpServletRequest request){
        System.out.println(request.getRemoteAddr());
        return helloService.hello(name);
    }
}
